package EnterpriseAlgorithm.LinkedList.Code.PrintShare;

import java.util.LinkedList;

public class Example {
    public static void main(String[] args) {
        Node Head1 = new Node(0);
        Node cur = Head1;
        for (int i = 1; i < 5; i++) {
            cur.next = new Node(i);
            cur = cur.next;
        }
        Node Head2 = new Node(3);
        cur = Head2;
        for (int i = 4; i < 7; i++) {
            cur.next = new Node(i);
            cur = cur.next;
        }


        Solution solution = new Solution();
        solution.printCommonPart(Head1, Head2);
    }
}
